package com.zzyl.nursing.service.member;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zzyl.nursing.domain.member.Reservation;
import com.zzyl.nursing.dto.member.ReservationDTO;
import com.zzyl.nursing.vo.member.TimeCountVO;

import java.util.List;

/**
 * 参观预约接口
 *
 * @author makangkang
 * @date 2025/10/22 22:12
 */

public interface IMemberReservationService extends IService<Reservation> {
    /**
     * 查询当天取消预约数量
     * @return
     */
    int cancelledCount();

    /**
     * 查询每个时间段剩余预约次数
     * @param time
     * @return
     */
    List<TimeCountVO> countByTime(Long time);

    /**
     * 新增预约
     *
     * @param reservationDTO
     * @return
     */
    boolean addReservation(ReservationDTO reservationDTO);

    /**
     * 分页查询预约
     * @param reservation
     * @return
     */
    List<Reservation> reservationPage(Reservation reservation);

    /**
     * 取消预约
     *
     * @param id
     * @return
     */
    boolean cancelById(Long id);


    boolean memberReservationExpiration();

}
